// Copyright (c) Microsoft Corporation. All rights reserved.

namespace Microsoft.Tools.CodeRunner.UnitTest
{
	using System;
	using Microsoft.VisualStudio.TestTools.UnitTesting;
	using Microsoft.Tools.CodeRunner;

	[TestClass]
	public class StringUtilsTests 
	{
		[TestMethod]
		public void TestWordBreak() 
		{
						  //1234567890123456789012345678901234567890123456789012345678901234567890
			string text1 = "This is some text that will be broken up onto word boundaries.";
			string[] lines = StringUtility.WordBreak(text1, 12);
			
			Assert.IsTrue(lines.Length == 6);	
			Assert.IsTrue(lines[2] == "will be ");

			              //1234567890123456789012345678901234567890123456789012345678901234567890
			string text2 = "Higgletypiggletywiggletywoo.  I wonder what this will do?";
			
			lines = StringUtility.WordBreak(text2, 12);
			
			Assert.IsTrue(lines.Length == 6);
		}
	}
}
